import java.util.ArrayList;


public class Database 
{

	// Database properties
	
	public ArrayList<Arn> db   = new ArrayList<Arn>();
	private String        name;
	private int           errors;
	
	public Database (String name)
	{
		this.name = name;
	}
	
	public void add (Arn a)
	{
		db.add(a);
	}
	
	public void add (ArrayList<Arn> list)
	{
		for (Arn a : list)
		{
			add(a);
		}
	}

	// Setters / Getters

	public int getErrors() {
		return errors;
	}

	public void error() {
		this.errors++;
	}

	public String getName() {
		return this.name;
	}

	public int getSize() {
		return db.size();
	}
	
	public String toString() {
		return "Database " + getName() + " : "+ getSize() +" tRNA - "+ getErrors() +" erreurs";
	}
}
